-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orphans in non showcontent categories #612
Orphans in non showcontent categories #612
Conversation
11f7606
to
86911a1
Compare
…ents in non-showcontent categories
@@ -15,7 +15,6 @@ | |||
{% for category, val in definitions.items() if category in sections[section] %} | |||
### {{ definitions[category]['name'] }} | |||
|
|||
{% if definitions[category]['showcontent'] %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should add an 612.removal
fragment, informat that when showcontent = False
the template will no longer receive the fragment content.
This is a note, just in case someone was missusing this feature with a custom template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's some confusion here. The existing behaviour is already that fragment content is not sent to the template (https://github.com/twisted/towncrier/pull/612/files#diff-36db088409efe07783d49792a18cec6ae3778ace338bf1cd08daa8a3fce29e93L166). This change just means that orphan fragment contents are sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. My bad. I misinterpreted the changes in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Looks good.
My only major comment is to add a .removal
release note informing that the Jinja2 template will no longer receive the fragment content, for showcontent = False
categories.
* Refactor rendering of title via config.title_format * Add newsfragment * Config docs * Fix restructuredtext formatting error
…wisted#608) * Refactor issue_key function to sort issues in a human-friendly way * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Rename newsfragment * Small improvement to test to show how text with numeric issues are sorted * Update src/towncrier/_builder.py docstring grammar Co-authored-by: Adi Roiban <[email protected]> * clarify new behaviour in newsfragment * Add some docstrings/comments to tests * linelength fix * Clarify news fragments vs tickets Co-authored-by: Adi Roiban <[email protected]> * Consistent use of "issue" rather than "ticket" * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * typo --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adi Roiban <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. Thanks.
Sorry for the previous review that was mediocre.
Description
Currently, orphans (newsfragments without an issue number) don't display correctly in a non "showcontent" category, such as the "misc" category.
These fragments don't have an issue number, but if they were important enough to have a fragment, I still think their content should then be shown.
Checklist
src/towncrier/newsfragments/
. Describe yourchange and include important information. Your change will be included in the public release notes.